Skip to content

[Vanilla Enhancement] Restore turret recoil effect #1625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 16, 2025

Conversation

CrimRecya
Copy link
Contributor

@CrimRecya CrimRecya commented Apr 13, 2025

  • Now you can use TurretRecoil to control units’ turret/barrel recoil effect when firing.
    • TurretTravel and BarrelTravel control the maximum recoil distance.
    • TurretRecoil.Suppress can prevent the weapon from producing this effect when firing.

In rulesmd.ini:

[SOMEVEHICLE]             ; VehicleType
TurretRecoil=no           ; boolean
TurretTravel=2            ; integer, pixels
TurretCompressFrames=1    ; integer, game frames
TurretHoldFrames=1        ; integer, game frames
TurretRecoverFrames=1     ; integer, game frames
BarrelTravel=2            ; integer, pixels
BarrelCompressFrames=1    ; integer, game frames
BarrelHoldFrames=1        ; integer, game frames
BarrelRecoverFrames=1     ; integer, game frames

[SOMEWEAPON]              ; WeaponType
TurretRecoil.Suppress=no  ; boolean
This is not a 1:1 restoration but a separate thing, not like it was in *Tiberian Sun*.

barrel


And:

  • Fix an issue that FireAngle was not taken into account when drawing barrel in TurretShadow.
  • Fixed an issue that barrel anim data will be incorrectly overwritten by turret anim data if the techno's section exists in the map file.

Copy link

github-actions bot commented Apr 13, 2025

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@Coronia Coronia added Needs testing ⚙️T2 T2 maintainer review is sufficient ❓New feature labels Apr 13, 2025
@Metadorius Metadorius added ❓Restored feature Logic present in older gen. games but not in YR ⚙️T1 T1 maintainer review is sufficient and removed ❓New feature ⚙️T2 T2 maintainer review is sufficient labels Apr 26, 2025
@Metadorius
Copy link
Member

I applied the new "Restored feature" type of contribution to this, so @Phobos-developers/t1-maintainers can review it, assuming the code replicates the original one from Tiberian Sun (@CrimRecya is that right?).

@CrimRecya
Copy link
Contributor Author

I applied the new "Restored feature" type of contribution to this, so @Phobos-developers/t1-maintainers can review it, assuming the code replicates the original one from Tiberian Sun (@CrimRecya is that right?).

Not copying, just drawing it according to my own understanding.
Vanilla has already dealt with the firing and updating parts, but there are issues with reading and drawing.
I fixed the reading issue, and drew its effect according to my understanding, but I actually don't know if the length unit used is the vanilla length unit.

@Metadorius
Copy link
Member

Hmm, maybe @ZivDero could review it and compare with TS which has those logics.

@ZivDero
Copy link
Contributor

ZivDero commented Apr 27, 2025

Hmm, maybe @ZivDero could review it and compare with TS which has those logics.

UnitClass_DrawAsVXL_RewriteTurretDrawing, which contains the bulk of the logic, doesn't appear "restored" to me, rather like just a bunch of new logic.

@Coronia Coronia requested a review from NetsuNegi May 6, 2025 06:25
@Starkku Starkku force-pushed the develop branch 2 times, most recently from b429215 to 280b1c8 Compare June 29, 2025 19:13
Copy link
Member

@Metadorius Metadorius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, few stylistic nitpicks

@CrimRecya
Copy link
Contributor Author

Can this be merged?

@CrimRecya CrimRecya merged commit 5a4750f into Phobos-developers:develop Aug 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs testing ❓Restored feature Logic present in older gen. games but not in YR ⚙️T1 T1 maintainer review is sufficient
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants